import java.util.Scanner;

/**
 * @Question 翻硬币
 * @Date 2023/3/8 10:48
 * @Solution
 */
public class 翻硬币 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        StringBuffer stringBuffer1 = new StringBuffer(scanner.nextLine());
        StringBuffer stringBuffer2 = new StringBuffer(scanner.nextLine());
        int count=0;
        for(int i=0;i<stringBuffer1.length();i++) {
            if(stringBuffer1.charAt(i)!=stringBuffer2.charAt(i)) {
                stringBuffer1.replace(i,i+1, String.valueOf(stringBuffer1.charAt(i)=='*'?'o':'*'));
                stringBuffer1.replace(i+1,i+2, String.valueOf(stringBuffer1.charAt(i+1)=='*'?'o':'*'));
                count++;
            }
        }
        System.out.println(count);
    }
}
